package com.kma.summer2012.client.events.engineer;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

public class CloseRequestEvent extends GwtEvent<CloseRequestEvent.CloseRequestEventHandler> {
    private static Type<CloseRequestEventHandler> TYPE = new Type<CloseRequestEventHandler>();
    public UICrumbsRequest request = null;


    public CloseRequestEvent(UICrumbsRequest request) {
        this.request = request;
    }

    public CloseRequestEvent() {
        //To change body of created methods use File | Settings | File Templates.
    }

    @Override
    public Type<CloseRequestEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(CloseRequestEventHandler closeRequestEventHandler) {
        closeRequestEventHandler.OnCloseRequest(this);
    }

    public static Type<CloseRequestEventHandler> getType() {
        return TYPE;
    }

    public interface CloseRequestEventHandler extends EventHandler {
        void OnCloseRequest(CloseRequestEvent event);
    }

    public UICrumbsRequest getRequest() {
        return request;
    }
}